{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/hagerans/Dropbox/Eigener Research/CD_Activism/Political Activism/Replication_JOP_final/master_logfile.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}24 Jun 2020, 10:03:22
{txt}
{com}. 
. *********************set path to ado-file folder here***************************
. adopath ++ "$ado/"
{txt}  [1]              "{res}/Users/hagerans/Dropbox/Eigener Research/CD_Activism/Political Activism/Replication_JOP_final/do-files/ado/{txt}"
  [2]  (BASE)      "{res}/Applications/Stata/ado/base/{txt}"
  [3]  (SITE)      "{res}/Applications/Stata/ado/site/{txt}"
  [4]              "{res}.{txt}"
  [5]  (PERSONAL)  "{res}/Users/hagerans/Documents/Stata/ado/personal/{txt}"
  [6]  (PLUS)      "{res}/Users/hagerans/Library/Application Support/Stata/ado/plus/{txt}"
  [7]  (OLDPLACE)  "{res}~/ado/{txt}"

{com}. 
. ********************************************************************************
. **********************generate the final datasets*******************************
. ********************************************************************************
. 
. 
. /*Note that we cannot include the raw data for confidientiality reasons. 
> The following do-file is creates the main dataset based on raw inputs */
. // do "$dofiles/cleaning/cleaning_master.do"
. 
. 
. 
. ********************************************************************************
. ********************************************************************************
. **********************Generate outputs *****************************************
. ********************************************************************************
. ********************************************************************************
. 
. *** Set globals ***
. 
. *Set control variables
. global contr female age member years_member experience canv_workshop canvass_any_before_main_unres app_before_main
{txt}
{com}. 
. 
. 
. 
. ********************************************************************************
. **********************Tables and Raw output for Figures ************************
. ********************************************************************************
. 
. *** Main tables ***
. 
. do "$dofiles/tables/Table_1.do"
{txt}
{com}. 
. *** Note that the p-values based on randomization inference vary slightly as would be expected***
. 
. use "$clean/clean_all.dta", clear
{txt}
{com}.                    
. loc experiments " canvass_any_main_unres  days_unres_main doors_unres_main_wins "
{txt}
{com}. 
.            
.                    
. preserve
{txt}
{com}. 
. clear all
{res}{txt}
{com}. eststo clear
{txt}
{com}. estimates drop _all
{txt}
{com}. 
. set obs 10
{txt}{p}
number of observations (_N)  was 0,
now 10
{p_end}

{com}. qui gen x = 1
{txt}
{com}. qui gen y = 1
{txt}
{com}. 
. loc columns = 0
{txt}
{com}. 
. foreach choice in `experiments' `experiments' {c -(}
{txt}  2{com}. 
.     loc ++columns
{txt}  3{com}.     qui eststo col`columns': reg x y
{txt}  4{com}. 
. {c )-}
{txt}
{com}. 
. restore
{txt}
{com}. 
. 
. /* Statistics */
. 
. loc colnum = 1
{txt}
{com}. loc colnames ""
{txt}
{com}. 
. foreach choice in `experiments' {c -(}
{txt}  2{com}. 
. /* Statistics */
. 
.  xi:  reg `choice' treatment , vce(r)
{txt}  3{com}.         estadd loc thisstat7 = `e(N)': col`colnum'
{txt}  4{com}.     sigstar treatment, prec(3)
{txt}  5{com}.     estadd loc thisstat2 = "`r(bstar)'": col`colnum'
{txt}  6{com}.     estadd loc thisstat3 = "`r(sestar)'": col`colnum'
{txt}  7{com}.         
. 
.         randcmd((treatment) reg `choice' treatment , robust), treatvars(treatment) reps(10000)
{txt}  8{com}.         mat define t=e(RCoef)
{txt}  9{com}.         local p_t: di %9.4f `=t[1,6]' 
{txt} 10{com}.         di `p_t'
{txt} 11{com}.         estadd loc thisstat4 = "[p=`p_t']": col`colnum'
{txt} 12{com}. 
. 
.         
.         qui sum `choice'  if treatment==0
{txt} 13{com}.     estadd scalar thisstat6 = r(mean): col`colnum'
{txt} 14{com}. 
.         estadd local thisstat8 = "No": col`colnum'
{txt} 15{com}.         
.     loc ++colnum
{txt} 16{com}.     loc colnames "`colnames' `"`: var la `choice''"'"
{txt} 17{com}. 
.         
.  xi:  reg `choice' treatment $contr , vce(r)
{txt} 18{com}.         estadd loc thisstat7 = `e(N)': col`colnum'
{txt} 19{com}.     sigstar treatment, prec(3)
{txt} 20{com}.     estadd loc thisstat2 = "`r(bstar)'": col`colnum'
{txt} 21{com}.     estadd loc thisstat3 = "`r(sestar)'": col`colnum'
{txt} 22{com}.         
. 
.         randcmd((treatment) reg `choice' treatment $contr , robust), treatvars(treatment) reps(10000)
{txt} 23{com}.         mat define t=e(RCoef)
{txt} 24{com}.         local p_t: di %9.4f `=t[1,6]' 
{txt} 25{com}.         di `p_t'
{txt} 26{com}.         estadd loc thisstat4 = "[p=`p_t']": col`colnum'
{txt} 27{com}. 
. 
.         
.         
.         qui sum `choice'  if  treatment==0
{txt} 28{com}.     estadd scalar thisstat6 = r(mean): col`colnum'
{txt} 29{com}. 
.         estadd local thisstat8 = "Yes": col`colnum'
{txt} 30{com}.         
.         
.     loc ++colnum
{txt} 31{com}.     loc colnames "`colnames' `"`: var la `choice''"'"
{txt} 32{com}. 
. 
.         {c )-}

{txt}Linear regression                               Number of obs     = {res}     1,417
                                                {txt}F(1, 1415)        =  {res}     6.28
                                                {txt}Prob > F          = {res}    0.0123
                                                {txt}R-squared         = {res}    0.0044
                                                {txt}Root MSE          =    {res} .34398

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}canvass_an..{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}treatment {c |}{col 14}{res}{space 2}-.0457179{col 26}{space 2}  .018243{col 37}{space 1}   -2.51{col 46}{space 3}0.012{col 54}{space 4}-.0815042{col 67}{space 3}-.0099316
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .1601671{col 26}{space 2} .0136971{col 37}{space 1}   11.69{col 46}{space 3}0.000{col 54}{space 4} .1332984{col 67}{space 3} .1870359
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Linear regression                               Number of obs     = {res}     1,417
                                                {txt}F(1, 1415)        =  {res}     6.28
                                                {txt}Prob > F          = {res}    0.0123
                                                {txt}R-squared         = {res}    0.0044
                                                {txt}Root MSE          =    {res} .34398

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}canvass_an..{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 3}treatment {c |}{col 14}{res}{space 2}-.0457179{col 26}{space 2}  .018243{col 37}{space 1}   -2.51{col 46}{space 3}0.012{col 54}{space 4}-.0815042{col 67}{space 3}-.0099316
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .1601671{col 26}{space 2} .0136971{col 37}{space 1}   11.69{col 46}{space 3}0.000{col 54}{space 4} .1332984{col 67}{space 3} .1870359
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{p 0 7}{space 1}{text:( 1)}{space 1} treatment = 0{p_end}

{txt}       F(  1,  1415) ={res}    6.28
{txt}{col 13}Prob > F ={res}    0.0123
 
Treatment variables determined directly by randomization: treatment. 

Post-randomization treatment based calculations:  0.
 
Treatment based variables tested in equation 1: treatment.
 
 
Running 10000 randomization iterations:
10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990 1000 1010 1020 1030 1040 1050 1060 {err}{hline 2}Break{hline 2}
{txt}{search r(1), local:r(1);}

end of do-file
{err}{hline 2}Break{hline 2}
{txt}{search r(1), local:r(1);}

end of do-file

{err}{hline 2}Break{hline 2}
{txt}{search r(1), local:r(1);}

{com}. exit
{err}{hline 2}Break{hline 2}
{txt}{search r(1), local:r(1);}

{com}. exit
